import config from "@/config"
import http from "@/utils/request"

export default {
	add: {
		url: `${config.API_URL}/project/createProject`,
		name: "添加项目",
		post: async function(data){
			return await http.post(this.url, data);
		}
	},
	edit: {
		url: `${config.API_URL}/project/updateProject`,
		name: "修改项目",
		post: async function(data){
			return await http.post(this.url, data);
		}
	},
	detail: {
		url: `${config.API_URL}/project/getProjectDetail`,
		name: "单项目基本信息",
		get: async function(params){
			return await http.get(this.url, params);
		}
	},
	list: {
		url: `${config.API_URL}/project/getProject`,
		name: "项目列表",
		get: async function(params){
			return await http.get(this.url, params);
		}
	},
	getProjectAll: {
		url: `${config.API_URL}/project/getProjectAll`,
		name: "项目列表不分页",
		get: async function(){
			return await http.get(this.url);
		}
	},
	delete: {
		url: `${config.API_URL}/project/deleteProject`,
		name: "删除",
		post: async function(params){
			return await http.post(this.url, params);
		}
	}
}
